<?php
/**
 * Created by PhpStorm.
 * User: 54946
 * Date: 2017/8/8
 * Time: 22:26
 */
namespace App\Repositories;

use App\Http\Model\Article;
use App\Http\Model\Participate;
use App\Http\Model\User;
use Illuminate\Support\Facades\Crypt;

class ParticipateRepository {

    use BaseRepository;
    protected $model;

    /**
     * UserRepository constructor.
     * @param User $user
     */
    public function __construct(Participate $participate)
    {
        $this->model=$participate;
    }

    /**
     * 模糊查询
     * @param $field
     * @param $condition
     * @param $content
     * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
     */
    public function getRecordByLikeSearch($field,$condition,$content)
    {
        return $this->model->where($field,$condition,$content)->orderByDesc('created_at')->paginate(15);
    }


}